package gui;

import javax.swing.*;
import java.awt.*;

public class CalculatorMVC extends JApplet{
	
	CalculatorModel model;				//Model		
	OperandView operandView;			//Operands view
	CalculatorController controller;	//Controller
	
	public void init(){
		resize(400,150); //width, height
		
		//Aanmaken van model
		model = new CalculatorModel();
		
		//Aanmaken van controller met het meegeven van het model
		controller = new CalculatorController(model);
		controller.setBackground(Color.gray);
		getContentPane().add(controller, BorderLayout.CENTER);
		
		operandView = new OperandView();
		operandView.setBackground(Color.gray);
		getContentPane().add(operandView, BorderLayout.NORTH);
		
		//Registreer de views bij het model
		model.addActionListener(operandView);		
		
	}
}